#ifndef CONFIGWIDGET_H
#define CONFIGWIDGET_H

#include <qwidget.h>
#include <qstring.h>

class QLineEdit;
class QSpinBox;
class QCheckBox;
class Config;

class ConfigWidget: public QWidget
{
	Q_OBJECT
	
signals:
	void quitButtonClicked();
	void rotateScreenButtonClicked();
	void turnOffDisplayButtonClicked();
	void enableKeyHelperButtonClicked();
	void disableKeyHelperButtonClicked();
	
public:
	ConfigWidget(Config *, QWidget *parent = NULL);
	virtual ~ConfigWidget();
	
	QString hostIPAddress() const;
	int port() const;
	
	bool mouseMoveAbsolute() const;
	bool isEnableTapClickChecked() const;
	int cursorAccel() const;
	int tapClickMargin() const;
	
	bool isDisableKeyHelperChecked() const;
	
	void save();
	
protected:
	
private:
	QLineEdit *_hostIPAddress;
	QSpinBox *_port;
	
	QCheckBox *_mouseMoveAbsolute;
	QCheckBox *_enableTapClick;
	QSpinBox *_tapClickMargin;
	QSpinBox *_cursorAccel;
	
	QCheckBox *_disableKeyHelper;
	
	Config *_config;
};

#endif	// CONFIGWIDGET_H
